package com.fxkj.cloud.drms.infra.mq.mqtt.sender;

import com.fxkj.cloud.drms.domain.mqtt.QueryDomain;
import com.fxkj.common.utils.JacksonUtil;

import java.io.Serializable;
import java.util.List;
import java.util.UUID;

/**
 * <p>description: </p>
 * @author ww
 * @date 2025/4/2 15:05
 */
public class MqttQuery extends BaseMqttMessage<String> implements Serializable {

    public MqttQuery(UUID requestId, List<String> data) {
        super(requestId, data);
    }

    public static MqttQuery create(QueryDomain query) {
        return new MqttQuery(query.getCommandId(), query.getQueryKeys());
    }

//    @Override
//    protected Integer getType() {
//        return MqttMessageType.QUERY.getCode();
//    }

    public String toJsonString() {
        return JacksonUtil.writeValueAsString(this);
    }
}
